package com.douqu.game.activity.database.model;

import java.util.Date;

public class ServerModel {
    private Integer id;

    private Integer areaId;

    private String name;

    private String type;

    private String ip;

    private String label;

    private String host;

    private Integer port;

    private Integer gmPort;

    private Integer rechargePort;

    private Byte status;

    private Date firstOpenTime;

    private Byte isRecommend;

    private Date createTime;

    private String remark;

    private boolean showMoney;//xianshi shouchong

    private String version;



    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public Integer getPort() {
        return port;
    }

    public void setPort(Integer port) {
        this.port = port;
    }

    public Byte getStatus() {
        return status;
    }

    public void setStatus(Byte status) {
        this.status = status;
    }

    public Date getFirstOpenTime() {
        return firstOpenTime;
    }

    public void setFirstOpenTime(Date firstOpenTime) {
        this.firstOpenTime = firstOpenTime;
    }

    public Byte getIsRecommend() {
        return isRecommend;
    }

    public void setIsRecommend(Byte isRecommend) {
        this.isRecommend = isRecommend;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAreaId() {
        return areaId;
    }

    public void setAreaId(Integer areaId) {
        this.areaId = areaId;
    }

    public Integer getGmPort() {
        return gmPort;
    }

    public void setGmPort(Integer gmPort) {
        this.gmPort = gmPort;
    }

    public boolean isShowMoney() {
        return showMoney;
    }

    public void setShowMoney(boolean showMoney) {
        this.showMoney = showMoney;
    }

    public Integer getRechargePort() {
        return rechargePort;
    }

    public void setRechargePort(Integer rechargePort) {
        this.rechargePort = rechargePort;
    }

    public String getLabel() {
        return label;
    }

    public void setLabel(String label) {
        this.label = label;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public String getHost() {
        return host;
    }

    public void setHost(String host) {
        this.host = host;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getMainServerRequestUrl(){
        if(getRechargePort() == 0){
            return "http://" + getIp()  + "/";
        }
        return "http://" + getIp() + ":" + getRechargePort() + "/";
    }

    @Override
    public String toString() {
        return "{" +
                "id=" + id +
                ", areaId=" + areaId +
                ", name='" + name + '\'' +
                ", ip='" + ip + '\'' +
                ", label='" + label + '\'' +
                ", port=" + port +
                ", gmPort=" + gmPort +
                ", rechargePort=" + rechargePort +
                ", status=" + status +
                ", firstOpenTime=" + firstOpenTime +
                ", isRecommend=" + isRecommend +
                ", createTime=" + createTime +
                ", remark='" + remark + '\'' +
                ", showMoney=" + showMoney +
                ", version='" + version + '\'' +
                '}';
    }
}